import Vue from "vue";
import VueRouter from "vue-router";


import { List } from 'vant';

Vue.use(List);

import Home from "../views/home/index.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: "/home",
    name: "Home",
    component: Home,
    meta: {
      isShow: true,
    }
  },
  {
    path: "/topic",
    name: "topic",
    component: () =>
      import("../views/topic/index.vue"),
    meta: {
      isShow: true,
    }
  },
  {
    path: "/category",
    name: "category",
    component: () =>
      import("../views/category/index.vue"),
    meta: {
      isShow: true,
    }
  },
  {
    path: "/category/search",
    name: "category",
    component: () =>
      import("../views/category/search/index.vue"),
    meta: {
      isShow: true,
    }
  },
  {
    path: "/category/descript",
    name: "category",
    component: () =>
      import("../views/category/descript/index.vue"),
    meta: {
      isShow: false,
    }
  },
  {
    path: "/cart",
    name: "cart",
    component: () =>
      import("../views/cart/index.vue"),
    meta: {
      isShow: true,
    }
  },
  {
    path: "/cart",
    name: "cart1",
    component: () =>
      import("../views/cart/address/index.vue"),
    meta: {
      isShow: true,
    }
  },
  {
    path: "/cart",
    name: "cart2",
    component: () =>
      import("../views/cart/another/index.vue"),
    meta: {
      isShow: true,
    }
  },
  {
    path: "/cart",
    name: "cart3",
    component: () =>
      import("../views/cart/new/index.vue"),
    meta: {
      isShow: true,
    }
  },

  {
    path: "/my",
    name: "my",
    component: () =>
      import("../views/my/index.vue"),
    meta: {
      isShow: true,
    }
  },
  {
    path: "/my/idea",
    name: "my",
    component: () =>
      import("../views/my/idea/index.vue"),
    meta: {
      isShow: true,
    }
  },
  {
    path: "/my/collect",
    name: "my1",
    component: () =>
      import("../views/my/collect/index.vue"),
    meta: {
      isShow: true,
    }
  },

  {
    path: "/about",
    name: "About",
    component: () =>
      import("../views/About.vue"),
    meta: {
      isShow: true,
    }
  },
  {
    path: "/home/city",
    name: "city",
    component: () =>
      import("../views/home/city/index.vue"),
    meta: {
      isShow: false,
    }
  },
  {
    path: "/home/new",
    name: "new",
    component: () =>
      import("../views/home/new/index.vue"),
    meta: {
      isShow: true,
    }
  },
  {
    path: "/home/more",
    name: "more",
    component: () =>
      import("../views/home/more/more.vue"),
    meta: {
      isShow: true,
    }
  },
  {
    path: "/categorylist",
    name: "list",
    component: () =>
      import("../views/category/list/index.vue"),
    meta: {
      isShow: false,
    }
  },

];

const router = new VueRouter({
  routes
});

export default router;
